Cakes, Custard, and Category Theory

^z 1st November 2023 at 8:52am

Eugenia Cheng's charming book Cakes, Custard + Category Theory (also titled How to Bake Pi in another edition) is fun and fast-paced. Cheng loves her subjects — all of them — and it shows. Her book doesn't have much explicit category theory in it. It's rather about category theory, and offers a glimpse of the abstraction and generalization behind it for the nonmathematical reader. And there are real cooking recipes to make all sorts of puddings, pastries, and other delicacies. And real mathematical recipes, often reminiscent of Martin Gardner's Scientific American columns on "Mathematical Games".

The spirit of Professor Cheng's book perhaps is most evident in Chapter 9 ("What Is Category Theory?") after a discussion of making things out of objects out of Lego modular blocks. In her section "Lego Lego" Cheng muses:

Have you ever tried making a Lego brick . . . out of Lego? It would be a sort of meta-Lego brick. Instead of a Lego train or a Lego car or a Lego house, you'd have built 'Lego Lego'. I have seen pictures of cakes made out of Lego bricks — a Lego cake. And I've seen Lego bricks made out of cake: cake Lego. And inevitably, there are cakes made out of Lego bricks that are themselves made out of cake: cake Lego cake.

Category theory is the mathematics of mathematics, a sort of 'meta-mathematics', like Lego Lego. Whatever mathematics does for the world, category theory does it for mathematics. This means that category theory is closely related to logic. Logic is the study of the reasoning that holds mathematics together. Category theory is the study of the structures that hold mathematics up.

At the end of the last chapter I suggested that mathematics is 'the process of working out exactly what is easy, and the process of making as many things as easy as possible'. Category theory, then, is:

      The process of working out exactly which parts of maths are easy, and the process of making as many parts of maths easy as possible.

In order to understand this we need to know what 'easy' means inside the context of mathematics. That's really at the heart of the matter, and is what we'll be investigating in this second part of the book. In the first part we saw that mathematics works by abstraction, that it seeks to study the principles and processes behind things, and that it seeks to axiomatise and generalise those things.

We will now see that category theory does the same thing, but entirely inside the mathematical world. It works by abstraction of mathematical things, it seeks to study the principles and processes behind mathematics, and it seeks to axiomatise and generalise those things.

Or as the authors of the Wikipedia article Abstract Nonsense put it:

... (Very) roughly speaking, category theory is the study of the general form of mathematical theories, without regard to their content. As a result, a proof that relies on category theoretic ideas often seems slightly out of context to those who are not used to such abstraction, sometimes to the extent that it resembles a comical non sequitur. Such proofs are sometimes dubbed "abstract nonsense" as a light-hearted way of alerting people to their abstract nature. ...

In other words, Category Theory is the generalization of generalization, the abstraction of abstraction, the meta (meta (meta ...)) of meta. Perhaps it's related to what some call "far domain analogies" or "concept arbitrage".

(cf. Do Meta (1999-05-08), No Concepts At All (2001-02-22), Key to the Treasure (2004-04-23), Greatest Inventions (2011-06-09), Simplicity via Abstraction (2016-01-07), ...) - ^z - 2016-02-14